﻿using IRUM.Core;
using IRUM.UI;
using IRUM.XingAPI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace IRUM
{
    public partial class FormMain : Form
    {
        public FormMain()
        {
            InitializeComponent();
        }

        private SessionCtrl m_session = new SessionCtrl();

        /// <summary>
        /// 로그인
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FormMain_Load(object sender, EventArgs e)
        {
            LoginDialog dlg = new LoginDialog(m_session);

            if (dlg.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                this.Close();
            }

            FormAnalysisDetails subForm = new FormAnalysisDetails();
            subForm.MdiParent = this;
            subForm.WindowState = FormWindowState.Maximized;
            subForm.Show();
        }

        private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
        {
        }



        private void 종목코드ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormProdCode subForm = new FormProdCode();
            subForm.MdiParent = this;
            subForm.WindowState = FormWindowState.Maximized;
            subForm.Show();
        }

        private void 수급분석ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormAnalysisMain subForm = new FormAnalysisMain();
            subForm.MdiParent = this;
            subForm.WindowState = FormWindowState.Maximized;
            subForm.Show();
        }


    }
}
